//首页
const express = require('express')
//引入连接池
const pool = require('../pool')
const router = express.Router()
router.get('/Travel_Guide/', (req, res, next) => {
    var obj = req.query
    pool.query('select * from Travel_Guide', [obj.aid], (err, r) => {
        if (err) {
            return next(err)
        }
        res.send({ code: 200, msg: '首页筛选', data: r })
    })
})
router.get('/Travel_Banner/', (req, res, next) => {
    var obj = req.query
    pool.query('select * from Travel_Banner', [obj.aid], (err, r) => {
        if (err) {
            return next(err)
        }
        res.send({ code: 200, msg: '封面图片', data: r })
    })
})

module.exports = router
